In the field of oil and gas well drilling, drilling fluids are used to drill wells from which hydrocarbons may be extracted. In the drilling process, water may be produced as well as hydrocarbons. Additionally, if hydraulic fracturing or “fracking” processes are used to produce hydrocarbons, frac flow back water may also be produced. Such processes may involve very large amounts of water, which may be very expensive and consume water resources that may be in limited supply. There is a need for a method to collect, treat, and recycle such drilling fluids, produced water, and frac flow back water so that recovered water may be reused. Similarly, there is a need for an improved method and apparatus for treating wastewater so that it may be reused.